package entities;

import tables.*;



public class Track {
	//holds all the artists of this track concatenates to each other by the string " & "
	private Artist artist;
	private Song song;
	

	public Track(Artist artist, String name){
		//build the list Artists
		this.artist = artist;
		//build the object song	
		this.song = new Song(-1, name, -1);
	}
	
	//TODO: TO FIX...
	public Track(String artist, String name){
		//build the list Artists
		this.artist = new Artist(-1, artist);
		//build the object song	
		this.song = new Song(-1, name, -1);
	}

	public void addArtist(Artist artist) {
		this.artist.addArtist(artist);
	}
	

	public Artist getArtist(){
		return this.artist;
	}
	public Song getSong() {
		return this.song;
	}
	
	@Override
	public String toString() {
		return getSong().getName() + " / " + getArtist().getName();
	}

}
